home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload Trio 2 / Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO / dir36 / batmouse.zip / ARTICLE.TXT next >
Text File  |  1993-08-22  |  8KB  |  169 lines

  1.  
  2.  
  3.  
  4.        INTRODUCING "BATMOUSE" - A MOUSE FOR YOUR BATCH FILES
  5.  
  6.  
  7.  
  8.        Have you ever wondered what makes a batch file seem slow at times
  9.        or have you tried to write a batch file and given up in
  10.        frustration?  Did you ever think you might like to have multiple
  11.        batch file menus or to interface your batch file with keyboard
  12.        responses?  Better yet, interact with your mouse?  Read on.
  13.  
  14.        If you use DOS programs exclusively or if you use Windows and
  15.        occasionally need to go to DOS to use some other program.
  16.        BATMOUSE and DIRECTOR.BAT provide a means to display a
  17.        sophisticated menu from within a batch file and are completely
  18.        compatible with all programs.  You may invoke Windows from
  19.        DIRECTOR.BAT and exit Windows temporarily to DIRECTOR.BAT,
  20.        execute an otherwise Windows compatible program, return to the
  21.        DIRECTOR and then return to Windows - no problem.
  22.  
  23.        DIRECTOR.BAT is an accumulation of ideas for batch files that
  24.        ultimately led to the development of the mouse interface program
  25.        BATMOUSE.  Simply put, BATMOUSE is a standalone program that may
  26.        be called from any batch file or from DOS; it causes the mouse
  27.        cursor to appear seamlessly and reacts to any keyboard input and
  28.        to the movements/clicks of your mouse.
  29.  
  30.        Communications between any batch file and BATMOUSE are conducted
  31.        via the environment variables HR & VC (for horizontal row &
  32.        vertical column) for a mouse click and the testing of ERRORLEVEL
  33.        for the last key pressed.
  34.  
  35.        BATMOUSE checks the environment for variables HR & VC in order to
  36.        set the mouse position to that which was clicked on the during
  37.        the last execution of the program, if there was one.  This is
  38.        performed at startup unless the environment variables have not
  39.        been previously set or have been set to a "-", in which case the
  40.        mouse appears in the center of the screen.  BATMOUSE always sets
  41.        HR & VC to a "-" when the user presses a key instead of a mouse
  42.        button.  This allows the batch file to discern which kind of
  43.        interpretation to make - mouse coordinate or key press.  If
  44.        either HR or VC = "-", the user last pressed a key.  Mouse screen
  45.        coordinates are 1,1 for the upper left corner and 25,80 (HR,VC
  46.        respectively) for the lower right corner.
  47.  
  48.        The DIRECTOR batch file may be used with or without a mouse.
  49.        However,  one of its greatest features is the integration of the
  50.        mouse interface program BATMOUSE.  Used without a mouse,
  51.        DIRECTOR.BAT requires the use of a program available on most
  52.        bulletin boards called REPLY.COM or KEYPRESS.COM.  They have been
  53.        described in numerous magazine articles and will not be discussed
  54.        here.  If you are currently using one of these programs with your
  55.        batch files, your existing batch file should work seamlessly with
  56.        BATMOUSE since the key values returned are identical.
  57.  
  58.        A complete listing of DIRECTOR.BAT with line reference numbers is
  59.        found in file DIRECTOR.TXT.  The line sequence numbers and
  60.        leading white space found in the left column of this listing
  61.        should be removed if you plan to use this example to create your
  62.        own batch file.
  63.  
  64.        DIRECTOR.BAT is sensitive to seven parameters (%1 %2 %3 %4 %5 %6
  65.        %7).  If you do not pass parameters the defaults of black and
  66.        white are used.  This allows you to pass only as many parameters
  67.        as you require - if you pass only parameter one, a particular
  68.        background screen will be painted and all the text will be white
  69.        on black.  The program SHOW (line 211) will paint any of 17
  70.        predefined background screens - the screen names are DIRSCN (B&W
  71.        or default use) and DIRSCN00-DIRSCN15 (various color
  72.        combinations).  Therefore, if parameter one (%1) contains 00 or
  73.        01 or 02 ∙∙∙∙ 15, the corresponding screen will be displayed;
  74.        hence, SHOW DIRSCN%1.
  75.  
  76.        The remaining six parameters are used to paint certain text
  77.        portions of the menu:
  78.  
  79.             -    %2 & %3 (foreground/background) are used to paint your
  80.                  personal menu title.
  81.             -    %4 & %5 (foreground/background) are used to paint the
  82.                  function key information.
  83.             -    %6 & %7 (foreground/background) are used to paint the
  84.                  program names at each line of each menu page.
  85.  
  86.        Each of the above color parameters may be created using the color
  87.        combinations for foreground and background.  The following
  88.        information is derived from the documentation for ANSI.SYS:
  89.  
  90.             Foreground Colors:
  91.  
  92.                  30 - Black
  93.                  31 - Red
  94.                  32 - Green
  95.                  33 - Yellow (which is brown unless BOLD is on)
  96.                  34 - Blue
  97.                  35 - Magenta
  98.                  36 - Cyan
  99.                  37 - White
  100.  
  101.             Background Colors (bold does not affect these colors):
  102.  
  103.                  40 - Black
  104.                  41 - Red
  105.                  42 - Green
  106.                  43 - Brown
  107.                  44 - Blue
  108.                  45 - Magenta
  109.                  46 - Cyan
  110.                  47 - White
  111.  
  112.        Try some of the following calls to the DIRECTOR:
  113.  
  114.                      %1 %2 %3 %4 %5 %6 %7
  115.  
  116.             DIRECTOR
  117.             DIRECTOR 00
  118.             DIRECTOR 02
  119.             DIRECTOR 03
  120.             DIRECTOR 04
  121.             DIRECTOR 05
  122.             DIRECTOR 10
  123.             DIRECTOR 12
  124.             DIRECTOR 14
  125.             DIRECTOR 00 33 44
  126.             DIRECTOR 00 33 44 37 47
  127.             DIRECTOR 00 33 44 37 47 37 44
  128.             DIRECTOR 00 33 46 37 47 37 44
  129.             DIRECTOR 06 33 37 37 47 37 41
  130.             DIRECTOR 08 33 47 37 47 37 41
  131.             DIRECTOR 08 33 40 37 47 37 41
  132.  
  133.        The following is a synopsis of the main features of DIRECTOR.BAT:
  134.  
  135.  
  136.             Multiple page menus - lines 8-23, 30-65, 73 & 90-95
  137.             Complete screen repaint - lines 2, 28, 78, 116 & 211
  138.             Minimal screen repaint - lines 30-65, 127 & 128
  139.             Internal program calls - lines 156-158
  140.             External program calls - lines 160-161
  141.             Personal customization - lines 31-39, 44-51, 56-63, 213 plus
  142.                                      color settings discussed above.
  143.  
  144.  
  145.  
  146.        As you can see, the options are quite diverse - you can change
  147.        DIRECTOR.BAT to suit any situation or menu requirement and to
  148.        paint most any color combination.  The best news of all is that
  149.        the process is compatible with all programs, performs very
  150.        quickly and requires no resident memory - unless of course you
  151.        aren't already using ANSI.SYS which does require 4K of resident
  152.        memory.
  153.  
  154.        BATMOUSE.COM and DIRECTOR.BAT are available through some BBS's
  155.        and shareware distributors.
  156.  
  157.        Nick Makris is a small business consultant and systems engineer
  158.        on the North Coast of California.  For a 'no-nonsense', fully
  159.        registered version of BATMOUSE, the corresponding files and this
  160.        more complete documentation, send a check for $10.00 (including
  161.        $1.00 P/H) to:
  162.  
  163.                  Startech Systems
  164.                  BATMOUSE
  165.                  PO BOX 1395
  166.                  Gualala CA, 95445-1395
  167.  
  168.        California residents add appropriate sales tax.
  169.